<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改通道')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-channel-edit" th:object="${sysChannel}">
        <input name="channelId" th:field="*{channelId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">接口名称：</label>
            <div class="col-sm-8">
                <input name="channelName" th:field="*{channelName}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">通道类型：</label>
            <div class="col-sm-8">
                <input name="channelTypes" th:field="*{channelTypes}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">通道网关地址：</label>
            <div class="col-sm-8">
                <input name="channelGateway" th:field="*{channelGateway}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">页面通知地址：</label>
            <div class="col-sm-8">
                <input name="channelCallbackurl" th:field="*{channelCallbackurl}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">回调地址：</label>
            <div class="col-sm-8">
                <input name="channelNotifyurl" th:field="*{channelNotifyurl}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">appid：</label>
            <div class="col-sm-8">
                <input name="channelAppid" th:field="*{channelAppid}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">商户秘钥：</label>
            <div class="col-sm-8">
                <textarea name="channelKey" th:field="*{channelKey}" class="form-control" type="text" required></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">通道费率：</label>
            <div class="col-sm-8">
                <input name="channelRate" th:field="*{channelRate}" class="form-control" type="text" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "system/channel";
    $("#form-channel-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-channel-edit').serialize());
        }
    }
</script>
</body>
</html>